package edu.sctu.practice.class02.lvchang.abstractClass;

import java.util.Scanner;

/**
 * Created by Administrator on 2015/9/18.
 */
public class Rectangle extends Shape {

    Scanner input = new Scanner(System.in);
    int a = input.nextInt();
    int b = input.nextInt();

    public int s, l;

    @Override
    public void perimeter() {
        l = (a + b) * 2;
        System.out.println("长方形的周长为：" + l);
    }

    @Override
    public void area() {
        s = a * b;
        System.out.println("长方形的面积为:" + s);
    }
}
